<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: ContactSpringDamper.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('da/d04/_contact_spring_damper_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ContactSpringDamper.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../da/d04/_contact_spring_damper_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef CONTACT_SPRING_DAMPER_H</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define CONTACT_SPRING_DAMPER_H</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d5/d79/_contact_constraint_8h.html">ContactConstraint.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d5/d9a/_floating_base_model_8h.html">Dynamics/FloatingBaseModel.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html">   12</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a> : <span class="keyword">public</span> <a class="code" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint</a>&lt;T&gt; {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#a82554c4327792e1ec4003ab95d94a646">   14</a></span>&#160;  <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a82554c4327792e1ec4003ab95d94a646">ContactSpringDamper</a>(<a class="code" href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel&lt;T&gt;</a>* model)</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      : <a class="code" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint</a>&lt;T&gt;(model) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a> = CC::_model-&gt;_nGroundContact;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a>; ++i) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;      <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>.push_back(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2&lt;T&gt;::Zero</a>());</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>.resize(_nGC);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  }</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#ae8eeeea2bccd1b2162c640f64c402c1f">   23</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ae8eeeea2bccd1b2162c640f64c402c1f">~ContactSpringDamper</a>() {}</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ad45f7a50bdf2c368053a4686a7f209e0">UpdateExternalForces</a>(T K, T D, T dt);</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#a0713774594a56c8a88c092dc768913f0">   36</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a0713774594a56c8a88c092dc768913f0">UpdateQdot</a>(<a class="code" href="../../de/d75/struct_f_b_model_state.html">FBModelState&lt;T&gt;</a>&amp; state) {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    (void)state; <span class="comment">/* Do nothing */</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  }</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">   41</a></span>&#160;  <span class="keywordtype">size_t</span> <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="../../d0/df2/class_contact_spring_damper.html#acec7f25a63187c2559597c916db86144">_groundContactWithOffset</a>(T K, T D);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">   49</a></span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned&lt;Vec2&lt;T&gt;</a>&gt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">   50</a></span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned&lt;Vec2&lt;T&gt;</a>&gt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;};</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="class_contact_spring_damper_html_ad45f7a50bdf2c368053a4686a7f209e0"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ad45f7a50bdf2c368053a4686a7f209e0">ContactSpringDamper::UpdateExternalForces</a></div><div class="ttdeci">virtual void UpdateExternalForces(T K, T D, T dt)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00013">ContactSpringDamper.cpp:13</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a70230597d37f3446c68c6adc729025e0"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">ContactSpringDamper::_nGC</a></div><div class="ttdeci">size_t _nGC</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00041">ContactSpringDamper.h:41</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3ed2d7a1fdebc191497c0cc0ab0a870b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 2, 1 &gt; Vec2</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00022">cppTypes.h:22</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html">FBModelState</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00038">FloatingBaseModel.h:38</a></div></div>
<div class="ttc" id="class_contact_constraint_html"><div class="ttname"><a href="../../d7/d6c/class_contact_constraint.html">ContactConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d79/_contact_constraint_8h_source.html#l00020">ContactConstraint.h:20</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a7aa082d54c07c3a9b70365755a7d02d6"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">ContactSpringDamper::deflectionRate</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; deflectionRate</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">ContactSpringDamper.h:49</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a078e1eaa8a3af13cef27a0a8d0c1302e"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a></div><div class="ttdeci">typename std::vector&lt; T, Eigen::aligned_allocator&lt; T &gt;&gt; vectorAligned</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00118">cppTypes.h:118</a></div></div>
<div class="ttc" id="_contact_constraint_8h_html"><div class="ttname"><a href="../../d5/d79/_contact_constraint_8h.html">ContactConstraint.h</a></div><div class="ttdoc">Virtual class of Contact Constraint logic. </div></div>
<div class="ttc" id="class_floating_base_model_html"><div class="ttname"><a href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00069">FloatingBaseModel.h:69</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a82554c4327792e1ec4003ab95d94a646"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a82554c4327792e1ec4003ab95d94a646">ContactSpringDamper::ContactSpringDamper</a></div><div class="ttdeci">ContactSpringDamper(FloatingBaseModel&lt; T &gt; *model)</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00014">ContactSpringDamper.h:14</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a0713774594a56c8a88c092dc768913f0"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a0713774594a56c8a88c092dc768913f0">ContactSpringDamper::UpdateQdot</a></div><div class="ttdeci">virtual void UpdateQdot(FBModelState&lt; T &gt; &amp;state)</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00036">ContactSpringDamper.h:36</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_ac395f87c687c6284b68116cac098e685"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">ContactSpringDamper::_tangentialDeflections</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; _tangentialDeflections</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">ContactSpringDamper.h:50</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_acec7f25a63187c2559597c916db86144"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#acec7f25a63187c2559597c916db86144">ContactSpringDamper::_groundContactWithOffset</a></div><div class="ttdeci">void _groundContactWithOffset(T K, T D)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00042">ContactSpringDamper.cpp:42</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a></div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00012">ContactSpringDamper.h:12</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_ae8eeeea2bccd1b2162c640f64c402c1f"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ae8eeeea2bccd1b2162c640f64c402c1f">ContactSpringDamper::~ContactSpringDamper</a></div><div class="ttdeci">virtual ~ContactSpringDamper()</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00023">ContactSpringDamper.h:23</a></div></div>
<div class="ttc" id="_floating_base_model_8h_html"><div class="ttname"><a href="../../d5/d9a/_floating_base_model_8h.html">FloatingBaseModel.h</a></div><div class="ttdoc">Implementation of Rigid Body Floating Base model data structure. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_860379c26524a894b3cf97b5b1ba5bdb.html">common</a></li><li class="navelem"><a class="el" href="../../dir_275ce76ae8a9e2090fbb7142d3994a0e.html">include</a></li><li class="navelem"><a class="el" href="../../dir_9f3746ebe7983c5cb005f7fd6ef8aef4.html">Collision</a></li><li class="navelem"><a class="el" href="../../da/d04/_contact_spring_damper_8h.html">ContactSpringDamper.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
